package com.dianping.cat.consumer.dependency.model.entity;

import com.dianping.cat.consumer.dependency.model.BaseEntity;
import com.dianping.cat.consumer.dependency.model.IVisitor;








public class Index
  extends BaseEntity<Index>
{
  private String m_name;
  private long m_totalCount;
  private long m_errorCount;
  private double m_sum;
  private double m_avg;

  public Index() {}

  public Index(String name) { this.m_name = name; }




  public void accept(IVisitor visitor) { visitor.visitIndex(this); }



  public boolean equals(Object obj) {
/*  34 */     if (obj instanceof Index) {
/*  35 */       Index _o = (Index)obj;

/*  37 */       if (!equals(getName(), _o.getName())) {
/*  38 */         return false;
      }

/*  41 */       return true;
    }

/*  44 */     return false;
  }


/*  48 */   public double getAvg() { return this.m_avg; }



/*  52 */   public long getErrorCount() { return this.m_errorCount; }



/*  56 */   public String getName() { return this.m_name; }



/*  60 */   public double getSum() { return this.m_sum; }



/*  64 */   public long getTotalCount() { return this.m_totalCount; }




  public Index incErrorCount() {
/*  77 */     this.m_errorCount++;
    return this;
  }

  public Index incErrorCount(long errorCount) {
/*  82 */     this.m_errorCount += errorCount;
/*  83 */     return this;
  }

  public Index incTotalCount() {
/*  87 */     this.m_totalCount++;
/*  88 */     return this;
  }

  public Index incTotalCount(long totalCount) {
/*  92 */     this.m_totalCount += totalCount;
/*  93 */     return this;
  }


  public void mergeAttributes(Index other) {
/*  98 */     assertAttributeEquals(other, "index", "name", this.m_name, other.getName());

/* 100 */     this.m_totalCount = other.getTotalCount();

/* 102 */     this.m_errorCount = other.getErrorCount();

/* 104 */     this.m_sum = other.getSum();

/* 106 */     this.m_avg = other.getAvg();
  }

  public Index setAvg(double avg) {
/* 110 */     this.m_avg = avg;
/* 111 */     return this;
  }

  public Index setErrorCount(long errorCount) {
/* 115 */     this.m_errorCount = errorCount;
/* 116 */     return this;
  }

  public Index setName(String name) {
/* 120 */     this.m_name = name;
/* 121 */     return this;
  }

  public Index setSum(double sum) {
/* 125 */     this.m_sum = sum;
/* 126 */     return this;
  }

  public Index setTotalCount(long totalCount) {
/* 130 */     this.m_totalCount = totalCount;
/* 131 */     return this;
  }
}


/* Location:              /Users/hanfei/Documents/apache-tomcat-9.0.24/webapps/cat/WEB-INF/lib/cat-consumer-3.0.0.jar!/com/dianping/cat/consumer/dependency/model/entity/Index.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.0.7
 */